package g4p.newg4p;

import g4p_controls.GEvent;
import g4p_controls.GImageToggleButton;
import processing.core.PApplet;

public class ImageToggleButton extends PApplet {

	
	GImageToggleButton tb0, tb1;
	
	public void setup(){
		size(300,300);
		tb0 = new GImageToggleButton(this, 10, 20, "hhh", 2);
		tb1 = new GImageToggleButton(this, 100, 20);
	}
	
	public void draw(){
		background(230);
	}
	
	public void handleToggleButtonEvents(GImageToggleButton button, GEvent event) {
		if(tb0 == button){
			println("tb0 state = " + tb0.stateValue());
		}
	}

}
